package #(basePackage).entity;

#if(swaggerEnable)
    import io.swagger.annotations.ApiModel;
    import io.swagger.annotations.ApiModelProperty;
#end
#if(lombokEnable)
    import lombok.Data;
    import lombok.EqualsAndHashCode;
    import lombok.experimental.Accessors;
#end
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * <p>
 *    #(table.tableComment)
 * </p>
 *
 * @author #(author)
 * @date #(date)
 * @remark #(remark)
 */
#if(lombokEnable)
    @Data
    @EqualsAndHashCode
    @Accessors(chain = true)
#end
@Table(name = "#(table.tableName)")
#if(swaggerEnable)
    @ApiModel(value = "#(table.tableName)")
#end
public class #(EntityName) implements Serializable{


    #for(columnInfo : table.columnInfos)
        #if(columnInfo.checked)
            #if(columnInfo.columnComment && columnInfo.columnComment != "")
                /**
                 * #(columnInfo.columnComment)
                 */
            #end
            #if(swaggerEnable)
                @ApiModelProperty(value = "#(columnInfo.columnComment)" )
            #end
            private #(columnInfo.javaFieldType) #(columnInfo.javaFieldName);
        #end
    #end

    #if(!lombokEnable)
        #for(columnInfo : table.columnInfos)
            #if(columnInfo.checked)
                public void set#(columnInfo.javaFieldName)(#(columnInfo.javaFieldType) #(columnInfo.javaFieldName))
        {
            this.#(columnInfo.javaFieldName) = #(columnInfo.javaFieldName);
        }

                public #(columnInfo.javaFieldType) get#(columnInfo.javaFieldName)()
        {
            return $column.javaField;
        }

            #end
        #end
    #end

}
